package com.icss.lesson3;


public class TestMain9 {
    public static void main(String[] args) {
        Thread t1 = Thread.currentThread();
//        Thread[main,5,main]
        System.out.println(t1);
        Target target = new Target();
        Thread t2 = new Thread(target, "第一个线程");
        // 通知CPU 可以运行t2线程
        t2.start();

        Thread t3 = new Thread(target, "第二个线程");
        // 通知CPU 可以运行t2线程
        t3.start();

        System.out.println("=====================================");
    }
}
class Target implements Runnable {

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread() + "@" + i);
        }
    }
}
